#pragma once
#include "mmdeviceapi.h"
#include "endpointvolume.h"

class EndpointCallBackImpl:public IAudioEndpointVolumeCallback 
{
public: 
EndpointCallBackImpl() {};
~EndpointCallBackImpl() {};
HRESULT STDMETHODCALLTYPE OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
ULONG STDMETHODCALLTYPE Release() { return 0; };
HRESULT STDMETHODCALLTYPE QueryInterface(
  REFIID riid,
  void   **ppvObject
) { return S_OK; };
ULONG STDMETHODCALLTYPE AddRef() { return 0; };
};
class Render 
{
private:
    IMMDevice* defaultRender;
    IAudioEndpointVolume* activedEndpointVolume = NULL;
    HRESULT activeVolumeEndpoint();
    void activeVolumeCallBack();
public:
    Render(/* args */);
    ~Render();
    
    float getVolumeLevel();

    void setVolumeLevel(int level);
};
